package com.hrms.doctor.mapper;

import com.hrms.doctor.domain.Schedule;
import com.hrms.doctor.domain.vo.ScheduleBriefVo;
import com.hrms.doctor.domain.vo.ScheduleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface ScheduleMapper {
    //List<Schedule> selectSchedule(String doctorName,String patientName);

    Integer updateSchedule(Schedule schedule);
    Integer insertSchedule(Schedule schedule);
    Integer deleteSchedule(@Param("list") List<Long> list);
    Integer selectCountByPatientId(Long id);
    Integer selectCountByDoctorId(Long id);
    List<ScheduleVo> selectPatientById(Long id);

    void deleteScheduleById(List<Long> list);
    List<ScheduleVo> selectDoctorById(Long id);

    List<ScheduleVo> selectPatientByIdWithName(@Param("id") Long id,@Param("patientName") String patientName);

    List<ScheduleBriefVo> getScheduleByTime(@Param("begin") LocalDateTime begin, @Param("end") LocalDateTime end,@Param("deptName") String deptName);

    ScheduleVo getInfoByScheduleId(Long id);
}
